import React from 'react';
import {
    BrowserRouter
} from 'react-router-dom';
import {Provider} from 'mobx-react';
import stores from '../store';
import RouteComponent from './RouterComponent'


// const PrivateRoute = ({ component: Component, ...rest }) => (
//   <Route {...rest} render={props => (
//     user.isAuthenticated ? (
//       <Component {...props}/>
//     ) : (
//       <Redirect to={{
//         pathname: '/login',
//         state: { from: props.location }
//       }}/>
//     )
//   )}/>
// )

export default (props) => (
    <Provider {...stores}>
        <BrowserRouter>
            <RouteComponent />
        </BrowserRouter>
    </Provider>
);
